﻿@model IEnumerable<LogManager.Base.IServer>
@using LogManager.Helpers
@functions{
    public string Selected(string server)
    {
        return Url.HasServer(server) ? "selected" : string.Empty;
    }    
}     

<div id="nav-accordion">
    @foreach (var server in Model)
    {
        <h3><a href="#@server.ServerName">@server.ServerName</a></h3>
        <div id="@(server.ServerName)-Container" class="@Selected(server.ServerName)">
            @Html.Action("ListServerLogNavigation","Log", new { serverName = server.ServerName})
        </div>
    }
</div>

<script type="text/javascript">
    jQuery(document).ready(function () {
        $("#nav-accordion").accordion({
            collapsible: true,
            active: 0,
            autoHeight: false
        });
    });
</script>


